﻿/**
 * @file   FITKAbaqusAdaptorTimePoints.h
 * @brief 输出时间点 适配器 用于INP文件读写过程中的Time Points解析
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date 2024-06-20
 */
#ifndef __FITKABAQUSADAPTORTIMEPOINTS__H__
#define __FITKABAQUSADAPTORTIMEPOINTS__H__

#include "FITKAbaqusAbstractAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

 //前置声明
ForwardDeclarNS(Interface, FITKAbaTimePoints)

namespace IO
{
    /**
     * @brief 输出时间点 读写适配器
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date 2024-06-20
     */
    class FITKAbaqusIOINPAPI FITKAbaqusAdaptorTimePoints : public FITKAbaqusAbstractAdaptor
    {
    public:
        explicit FITKAbaqusAdaptorTimePoints() = default;
        ~FITKAbaqusAdaptorTimePoints() = default;


        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-20
         */
        QString getAdaptorClass() override;

        /**
         * @brief 适配器读取
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-20
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-20
         */
        bool adaptW() override;

    private:
        /**
         * @brief 写出单个时间点数据
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-20
         */
        bool writePointsData();
        /**
         * @brief 写出时间开始，结束，增量数据
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-20
         */
        bool writeStartEndIncrement();

    };

    Register2FITKIOAdaptorFactory(INP, Interface::FITKAbaTimePoints, FITKAbaqusAdaptorTimePoints);

}

#endif